package com.itheima.day07_Collection;

import java.util.LinkedHashMap;
import java.util.Set;

public class MapTest3 {
    public static void main(String[] args) {
        LinkedHashMap<Student, String> Stus = new LinkedHashMap<>();
        Student s1 = new Student(2,"王阳明", 100);
        Student s2 = new Student(2,"须菩提", 98);
        Student s3 = new Student(3,"鸿钧道人", 88);
        Student s4 = new Student(4,"释迦摩尼", 75);
        Student s5 = new Student(5,"元始天尊", 97);
        Stus.put(s1,"浙江省宁波市余姚市阳明街道");
        Stus.put(s2,"西牛贺洲的灵台方寸山斜月三星洞");
        Stus.put(s3,"辽宁本溪水洞");
        Stus.put(s4,"尼泊尔南部提罗拉科特");
        Stus.put(s5,"天津市宁河区丰台镇南部");
        Set<Student> stus = Stus.keySet();
        for (Student student : stus) {
            String value = Stus.get(student);
            System.out.println(student + ", 家庭地址:" + value);
        }
    }
}
